import request from '@/utils/request'

export function auditLogTable(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/log/audit/table`,
    method: 'post',
    data: query
  })
}

export function auditLogDelete(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/log/audit/delete`,
    method: 'post',
    data: query
  })
}

export function beanLogTable(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/log/beanpost/table`,
    method: 'post',
    data: query
  })
}

export function beanLogDelete(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/log/beanpost/delete`,
    method: 'post',
    data: query
  })
}

export function loginLogTable(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/log/login/table`,
    method: 'post',
    data: query
  })
}

export function loginLogDelete(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/log/login/delete`,
    method: 'post',
    data: query
  })
}

export function messageLogTable(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/log/message/table`,
    method: 'post',
    data: query
  })
}

export function messageLogDelete(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/log/message/delete`,
    method: 'post',
    data: query
  })
}

export function quartzLogTable(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/log/quartz/table`,
    method: 'post',
    data: query
  })
}

export function quartzLogDelete(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/log/quartz/delete`,
    method: 'post',
    data: query
  })
}

export function blockTable(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/monitor/block/table`,
    method: 'post',
    data: query
  })
}

export function blockDelete(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/monitor/block/delete`,
    method: 'post',
    data: query
  })
}

export function serverInfo() {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/monitor/server_info`,
    method: 'get'
  })
}

export function redisInfo() {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/redis/redis_info`,
    method: 'get'
  })
}

export function redisKeyList(search) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/redis/key_list?match=${search}`,
    method: 'get'
  })
}

export function redisKeyValue(key) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/redis/key_value?key=${key}`,
    method: 'get',
    contentType: 'json'
  })
}

export function redisKeyDelete(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/redis/delete`,
    method: 'post',
    data: query
  })
}
